package com.jt.sys.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.jt.common.vo.SysUserDeptResult;
import com.jt.sys.entity.SysUser;

public interface SysUserDao {
	/**
	 * 查询当前页数据
	 * 包含用户信息
	 * 包含部门信息
	 * @param name
	 * @param startIndex
	 * @param pageSize
	 * @return
	 */
	List<SysUserDeptResult> findPageObjects(
			@Param("username")String username,
			@Param("startIndex")Integer startIndex,
			@Param("pageSize")Integer pageSize);
	/**
	 * 查询总行数
	 * @param name
	 * @return
	 */
	int getRowCount(@Param("username")String username);
	
	int validById(@Param("id")Integer id,@Param("valid")Byte valid);
	
	int insertObject(SysUser entity);
	
	int updateObject(SysUser entity);
	
	SysUser findUserByUserName(String username);
	
	int findValidByUserName(String username);
	
	int findIdByUsername(String username);
}
